3.12.2 \(\int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx\) [1102]

3.12.2.1 Optimal result
3.12.2.2 Mathematica [A] (verified)
3.12.2.3 Rubi [A] (verified)
3.12.2.4 Maple [A] (verified)
3.12.2.5 Fricas [B] (verification not implemented)
3.12.2.6 Sympy [F(-1)]
3.12.2.7 Maxima [A] (verification not implemented)
3.12.2.8 Giac [B] (verification not implemented)
3.12.2.9 Mupad [B] (verification not implemented)

3.12.2.1 Optimal result

Integrand size = 27, antiderivative size = 98 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{16 d}-\frac {b \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d} \]

output
-1/16*a*arctanh(cos(d*x+c))/d-1/5*b*cot(d*x+c)^5/d-1/16*a*cot(d*x+c)*csc(d 
*x+c)/d+1/8*a*cot(d*x+c)*csc(d*x+c)^3/d-1/6*a*cot(d*x+c)^3*csc(d*x+c)^3/d
 
3.12.2.2 Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.79 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \cot ^5(c+d x)}{5 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{384 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{384 d} \]

input
Integrate[Cot[c + d*x]^4*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]
 
output
-1/5*(b*Cot[c + d*x]^5)/d - (a*Csc[(c + d*x)/2]^2)/(64*d) + (a*Csc[(c + d* 
x)/2]^4)/(64*d) - (a*Csc[(c + d*x)/2]^6)/(384*d) - (a*Log[Cos[(c + d*x)/2] 
])/(16*d) + (a*Log[Sin[(c + d*x)/2]])/(16*d) + (a*Sec[(c + d*x)/2]^2)/(64* 
d) - (a*Sec[(c + d*x)/2]^4)/(64*d) + (a*Sec[(c + d*x)/2]^6)/(384*d)
 
3.12.2.3 Rubi [A] (verified)

Time = 0.66 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.09, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 3317, 3042, 3087, 15, 3091, 3042, 3091, 3042, 4255, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^4 (a+b \sin (c+d x))}{\sin (c+d x)^7}dx\)

\(\Big \downarrow \) 3317

\(\displaystyle a \int \cot ^4(c+d x) \csc ^3(c+d x)dx+b \int \cot ^4(c+d x) \csc ^2(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^4dx+b \int \sec \left (c+d x-\frac {\pi }{2}\right )^2 \tan \left (c+d x-\frac {\pi }{2}\right )^4dx\)

\(\Big \downarrow \) 3087

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^4dx+\frac {b \int \cot ^4(c+d x)d(-\cot (c+d x))}{d}\)

\(\Big \downarrow \) 15

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^4dx-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (-\frac {1}{2} \int \cot ^2(c+d x) \csc ^3(c+d x)dx-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (-\frac {1}{2} \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (\frac {1}{2} \left (\frac {1}{4} \int \csc ^3(c+d x)dx+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {1}{2} \left (\frac {1}{4} \int \csc (c+d x)^3dx+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 4255

\(\displaystyle a \left (\frac {1}{2} \left (\frac {1}{4} \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {1}{2} \left (\frac {1}{4} \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

\(\Big \downarrow \) 4257

\(\displaystyle a \left (\frac {1}{2} \left (\frac {1}{4} \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {b \cot ^5(c+d x)}{5 d}\)

input
Int[Cot[c + d*x]^4*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]
 
output
-1/5*(b*Cot[c + d*x]^5)/d + a*(-1/6*(Cot[c + d*x]^3*Csc[c + d*x]^3)/d + (( 
Cot[c + d*x]*Csc[c + d*x]^3)/(4*d) + (-1/2*ArcTanh[Cos[c + d*x]]/d - (Cot[ 
c + d*x]*Csc[c + d*x])/(2*d))/4)/2)
 

3.12.2.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3087
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> Simp[1/f   Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + 
f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n - 1) 
/2] && LtQ[0, n, m - 1])
 

rule 3091
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m 
 + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1))   Int[(a*Sec[e + f*x])^m*( 
b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & 
& NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
 

rule 3317
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a   Int[(g*Co 
s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d   Int[(g*Cos[e + f*x])^ 
p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
3.12.2.4 Maple [A] (verified)

Time = 0.44 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{48}+\frac {\cos \left (d x +c \right )}{16}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {b \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d}\) \(118\)
default \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{5}\left (d x +c \right )}{24 \sin \left (d x +c \right )^{4}}+\frac {\cos ^{5}\left (d x +c \right )}{48 \sin \left (d x +c \right )^{2}}+\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{48}+\frac {\cos \left (d x +c \right )}{16}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {b \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d}\) \(118\)
parallelrisch \(\frac {-5 a \left (\cot ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+5 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -12 b \left (\cot ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+12 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+15 a \left (\cot ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-15 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +60 b \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-60 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+15 a \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-15 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +120 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-120 b \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+120 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1920 d}\) \(184\)
risch \(\frac {-240 i b \,{\mathrm e}^{10 i \left (d x +c \right )}+15 a \,{\mathrm e}^{11 i \left (d x +c \right )}+240 i b \,{\mathrm e}^{8 i \left (d x +c \right )}+235 a \,{\mathrm e}^{9 i \left (d x +c \right )}-480 i b \,{\mathrm e}^{6 i \left (d x +c \right )}+390 a \,{\mathrm e}^{7 i \left (d x +c \right )}+480 i b \,{\mathrm e}^{4 i \left (d x +c \right )}+390 a \,{\mathrm e}^{5 i \left (d x +c \right )}-48 i b \,{\mathrm e}^{2 i \left (d x +c \right )}+235 a \,{\mathrm e}^{3 i \left (d x +c \right )}+48 i b +15 a \,{\mathrm e}^{i \left (d x +c \right )}}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{16 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{16 d}\) \(198\)
norman \(\frac {-\frac {a}{384 d}+\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}+\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}+\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{160 d}+\frac {b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d}-\frac {b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}+\frac {b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}-\frac {b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d}+\frac {b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}\) \(254\)

input
int(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(a*(-1/6/sin(d*x+c)^6*cos(d*x+c)^5-1/24/sin(d*x+c)^4*cos(d*x+c)^5+1/48 
/sin(d*x+c)^2*cos(d*x+c)^5+1/48*cos(d*x+c)^3+1/16*cos(d*x+c)+1/16*ln(csc(d 
*x+c)-cot(d*x+c)))-1/5*b/sin(d*x+c)^5*cos(d*x+c)^5)
 
3.12.2.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (88) = 176\).

Time = 0.29 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.91 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {96 \, b \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + 30 \, a \cos \left (d x + c\right )^{5} + 80 \, a \cos \left (d x + c\right )^{3} - 30 \, a \cos \left (d x + c\right ) - 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{480 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]

input
integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="fricas" 
)
 
output
1/480*(96*b*cos(d*x + c)^5*sin(d*x + c) + 30*a*cos(d*x + c)^5 + 80*a*cos(d 
*x + c)^3 - 30*a*cos(d*x + c) - 15*(a*cos(d*x + c)^6 - 3*a*cos(d*x + c)^4 
+ 3*a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + c) + 1/2) + 15*(a*cos(d*x + c) 
^6 - 3*a*cos(d*x + c)^4 + 3*a*cos(d*x + c)^2 - a)*log(-1/2*cos(d*x + c) + 
1/2))/(d*cos(d*x + c)^6 - 3*d*cos(d*x + c)^4 + 3*d*cos(d*x + c)^2 - d)
 
3.12.2.6 Sympy [F(-1)]

Timed out. \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**4*csc(d*x+c)**7*(a+b*sin(d*x+c)),x)
 
output
Timed out
 
3.12.2.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.08 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {5 \, a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} + 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {96 \, b}{\tan \left (d x + c\right )^{5}}}{480 \, d} \]

input
integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="maxima" 
)
 
output
1/480*(5*a*(2*(3*cos(d*x + c)^5 + 8*cos(d*x + c)^3 - 3*cos(d*x + c))/(cos( 
d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - 1) - 3*log(cos(d*x + c) 
 + 1) + 3*log(cos(d*x + c) - 1)) - 96*b/tan(d*x + c)^5)/d
 
3.12.2.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (88) = 176\).

Time = 0.35 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.05 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {5 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {294 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \]

input
integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="giac")
 
output
1/1920*(5*a*tan(1/2*d*x + 1/2*c)^6 + 12*b*tan(1/2*d*x + 1/2*c)^5 - 15*a*ta 
n(1/2*d*x + 1/2*c)^4 - 60*b*tan(1/2*d*x + 1/2*c)^3 - 15*a*tan(1/2*d*x + 1/ 
2*c)^2 + 120*a*log(abs(tan(1/2*d*x + 1/2*c))) + 120*b*tan(1/2*d*x + 1/2*c) 
 - (294*a*tan(1/2*d*x + 1/2*c)^6 + 120*b*tan(1/2*d*x + 1/2*c)^5 - 15*a*tan 
(1/2*d*x + 1/2*c)^4 - 60*b*tan(1/2*d*x + 1/2*c)^3 - 15*a*tan(1/2*d*x + 1/2 
*c)^2 + 12*b*tan(1/2*d*x + 1/2*c) + 5*a)/tan(1/2*d*x + 1/2*c)^6)/d
 
3.12.2.9 Mupad [B] (verification not implemented)

Time = 11.68 (sec) , antiderivative size = 205, normalized size of antiderivative = 2.09 \[ \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{128\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}+\frac {a}{6}\right )}{64\,d}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{16\,d} \]

input
int((cos(c + d*x)^4*(a + b*sin(c + d*x)))/sin(c + d*x)^7,x)
 
output
(b*tan(c/2 + (d*x)/2))/(16*d) - (a*tan(c/2 + (d*x)/2)^2)/(128*d) - (a*tan( 
c/2 + (d*x)/2)^4)/(128*d) + (a*tan(c/2 + (d*x)/2)^6)/(384*d) - (b*tan(c/2 
+ (d*x)/2)^3)/(32*d) + (b*tan(c/2 + (d*x)/2)^5)/(160*d) - (cot(c/2 + (d*x) 
/2)^6*(a/6 + (2*b*tan(c/2 + (d*x)/2))/5 - (a*tan(c/2 + (d*x)/2)^2)/2 - (a* 
tan(c/2 + (d*x)/2)^4)/2 - 2*b*tan(c/2 + (d*x)/2)^3 + 4*b*tan(c/2 + (d*x)/2 
)^5))/(64*d) + (a*log(tan(c/2 + (d*x)/2)))/(16*d)